let k = 1
var kthCharacter = function (k) {
    let s = 'a'
    while (s.length < k) {
        const arr = []
        for (const c of s) {
            arr.push(String.fromCharCode(c.charCodeAt(0) + 1))
        }
        s = s + arr.join('')
    }
    return s[k - 1]
};
console.log(kthCharacter(k));
